#include <iostream>
using namespace std;
int max ( int a, int b, int c)//zhijie shengming he dingyi.
{
	if (a >= b && a>= c) return a;
	if (b >= a && b>= c) return b;
	return c;
}

int min (int a, int b, int c)
{
	if (a <= b && a <= c) return a;
	if (b <= a && b <= c) return b;
	return c;
}

void output (int a)
{
	cout << a <<endl;
	return;
}

int main()
{
	int a, b, c;
	cout << "shuru san ge zhengshu:" << endl;
	cin >> a >> b >> c;
	output( max(a, b, c));//max de fanhuizhi zuowei output de shican.
	output( min(a, b, c));//min de fanhuizhi zuowei output de shican.
	return 0;
}
